﻿using Architecture.Domain.Service;
using Architeture.Domain;
using MediatR;
using RBAC.ZhuBoLin.Application.Command.RoleCommand;

namespace RBAC.ZhuBoLin.Application.CommandHandlers.RoleHandler
{
    public class UserSetCommandHandler : IRequestHandler<UserSetCommand, UserInfo>
    {
        private readonly IUserService userService;

        public UserSetCommandHandler(IUserService userService)
        {
            this.userService = userService;
        }

        public async Task<UserInfo> Handle(UserSetCommand request, CancellationToken cancellationToken)
        {
            return await userService.SetUserInfo(request.uid);
        }


    }
}
